home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Include / DShowIDL / sbe.idl < prev    next >
Encoding:
Text File  |  2004-09-27  |  49.2 KB  |  1,349 lines

  1.  
  2. /*++
  3.  
  4.     Copyright (c) 2002 Microsoft Corporation
  5.  
  6.     Module Name:
  7.  
  8.         sbe.idl
  9.  
  10.     Abstract:
  11.  
  12.         This module the StreamBuffer interface definitions & CLSIDs, public
  13.  
  14. --*/
  15.  
  16. import "unknwn.idl" ;
  17. import "wtypes.idl" ;
  18. import "objidl.idl";
  19. import "strmif.idl" ;
  20.  
  21. //  ============================================================================
  22.  
  23. //  interfaces
  24. interface   IStreamBufferSink ;                     //  locking & recording
  25. interface   IStreamBufferSink2 ;                    //  ext locking
  26. interface   IStreamBufferSink3 ;                    //  specify the minimum
  27. interface   IStreamBufferSource ;                   //  associates with IStreamBufferSink
  28. interface   IStreamBufferRecordControl ;            //  recording control
  29. interface   IStreamBufferRecordingAttribute ;       //  StreamBuffer attribute creation
  30. interface   IEnumStreamBufferRecordingAttrib ;      //  StreamBuffer attribute enumeration
  31. interface   IStreamBufferConfigure ;                //  configuration interface
  32. interface   IStreamBufferConfigure2 ;               //  configuration interface; more
  33. interface   IStreamBufferMediaSeeking ;             //  IMediaSeeking but with different GUID
  34. interface   IStreamBufferMediaSeeking2 ;            //  + available filter & frame rate on FF/RW
  35. interface   IStreamBufferPolicy ;                   //  StreamBuffer policies
  36. interface   IStreamBufferInitialize ;               //  allows 3rd party app to set HKEY
  37. interface   IStreamBufferDataCounters ;             //  collect data rate from the pins
  38.  
  39. [
  40.     object,
  41.     uuid(9ce50f2d-6ba7-40fb-a034-50b1a674ec78),
  42.     pointer_default(unique)
  43. ]
  44. [local] interface IStreamBufferInitialize : IUnknown
  45. {
  46.     /*++
  47.         ------------------------------------------------------------------------
  48.         SetHKEY ()
  49.  
  50.         Implemented on StreamBufferStreamSink and StreamBufferSource filters.
  51.         Gives a hosting application the ability to specify HKEY root in
  52.           registry.  This method must called **early**: after the filter is
  53.           instantiated, but before StreamBufferSource is locked (explicitly or
  54.           implicitely) if calling the method on StreamBufferSource, or before
  55.           a source is set (via IStreamBufferSource or IFileSourceFilter) if
  56.           calling the method on StreamBufferStreamSource.  If a call is made
  57.           after either filter has been initialized internally, the call will
  58.           fail with E_UNEXPECTED.  The hosting application is responsible for
  59.           ensuring that the HKEY passed in is writable & readable per the
  60.           logged-on user privileges.  The HKEY is duplicated internally,
  61.           so the caller can close it after making this call.
  62.     --*/
  63.     HRESULT
  64.     SetHKEY (
  65.         [in]    HKEY    hkeyRoot
  66.         ) ;
  67.  
  68.     /*++
  69.         ------------------------------------------------------------------------
  70.         SetSIDs ()
  71.  
  72.         Implemented on StreamBufferStreamSink and StreamBufferSource filters.
  73.         Provides a way for the hosting application to specify security-level
  74.           sharing between capture and render processes and contexts.  By
  75.           default security attributes are inherited from the hosting process,
  76.           unless the application overrides the defaults and provides them via
  77.           this method.
  78.     --*/
  79.     HRESULT
  80.     SetSIDs (
  81.         [in]                    DWORD   cSIDs,
  82.         [in, size_is (cSIDs)]   PSID *  ppSID
  83.         ) ;
  84. } ;
  85.  
  86. /*++
  87.     ============================================================================
  88.     ============================================================================
  89.     IStreamBufferSink
  90.  
  91.     Stream Source interface;
  92.     implemented on the StreamBufferSink filter;
  93.     Only way to get a recorder object's IUnknown (object will subsequently
  94.         be associated with this Sink)
  95. --*/
  96.  
  97. enum {
  98.     RECORDING_TYPE_CONTENT = 0,         //  no post-recording or overlapped
  99.     RECORDING_TYPE_REFERENCE,           //  allows post-recording & overlapped
  100. } ;
  101.  
  102. [
  103.     object,
  104.     uuid(afd1f242-7efd-45ee-ba4e-407a25c9a77a),
  105.     pointer_default(unique)
  106. ]
  107. interface IStreamBufferSink : IUnknown
  108. {
  109.     /*++
  110.         ------------------------------------------------------------------------
  111.         LockProfile ()
  112.  
  113.         1.  Locks the profile;
  114.         2.  No *new* input pin connections will be accepted;
  115.         3.  Existing pins that are, or have ever been, connected can be
  116.             reconnected if the media type is exactly the same as the first
  117.             successful connection;
  118.         4.  Can be called multiple times with the same parameter as the initial
  119.             LockProfile() call was made with i.e. more than once with NULL if
  120.             initially locked with NULL, or more than once with a string if
  121.             initially locked with a string; if the profile is already locked,
  122.             and the parameters are the same, returns S_FALSE, else the call
  123.             fails (if trying to lock a locked profile with a different
  124.             parameter)
  125.         5.  Must be called before the filter that implements this interface is
  126.             ever run; when it is run, it locks implicitely and this method has
  127.             no effect if called with NULL parameters, or fails if called with
  128.             non-NULL parameter for the reasons listed above;
  129.         6.  Errors with VFW_E_UNSUPPORTED_STREAM if there are no streams in the
  130.             profile;
  131.  
  132.         Parameter Detail
  133.         ----------------
  134.  
  135.         pszStreamBufferFilename
  136.  
  137.             Is a NULL-terminated filename string.  If the content written by
  138.             this sink is to be shared cross-process, this parameter specifies a
  139.             filename that will be opened by any reader(s) to read & render the
  140.             content sent into the sink.
  141.  
  142.             Can be NULL (not specified)
  143.  
  144.             Must be a full-path filename; if no path is specified, the file is
  145.             created in a "current" directory
  146.  
  147.             If the file already exists, the call fails
  148.  
  149.             Is opened with DELETE_ON_CLOSE flag, so is automatically deleted
  150.             when the sink is unlocked, or when the hosting process terminates
  151.     --*/
  152.     HRESULT
  153.     LockProfile (
  154.         [in]    LPCWSTR pszStreamBufferFilename
  155.         ) ;
  156.  
  157.     /*++
  158.         ------------------------------------------------------------------------
  159.         CreateRecorder ()
  160.  
  161.         1.  Returns a *new* recorder object's IUnknown;
  162.         2.  Caller can call QueryInterface() on the returned pointer to get
  163.             interface pointers to configure & control the recording;
  164.         3.  Returned IUnknown pointer is ref'd & must be Release()'d by the
  165.             caller
  166.         4.  IStreamBufferSink interface must have been locked (explicitely or
  167.             implicitely) prior to call
  168.  
  169.         To create an ordinary recording, specify RECORDING_TYPE_CONTENT for the
  170.         dwRecordType parammeter.  This will record the content directly into
  171.         the specified file.  These recording types only accept start and stop
  172.         times that occur in the future.
  173.  
  174.         A recording of type RECORDING_TYPE_REFERENCE generates a small file
  175.         that references content saved in temporary storage.  Recordings of this
  176.         type can have start and stop times that occurs in the past, and can
  177.         overlap other same-type recordings.
  178.  
  179.         Reference recording *content* will be saved in the same subdirectory as
  180.         the specified reference file, but with hidden and system attributes.
  181.         The naming convention of the files will append a _1.sbe, _2.sbe, etc...
  182.         to the filename (minus extension) specified in the call e.g. a
  183.         "seinfeld01.sbe" reference file will have saved content in hidden
  184.         and system files "seinfeld01_1.sbe", "seinfeld01_2.sbe", etc...
  185.  
  186.     --*/
  187.     HRESULT
  188.     CreateRecorder (
  189.         [in]    LPCWSTR     pszFilename,
  190.         [in]    DWORD       dwRecordType,       //  RECORDING_TYPE_CONTENT or RECORDING_TYPE_REFERENCE
  191.         [out]   IUnknown ** pRecordingIUnknown
  192.         ) ;
  193.  
  194.     /*++
  195.         ------------------------------------------------------------------------
  196.         IsProfileLocked ()
  197.  
  198.         1.  Returns S_OK if the profile is locked and S_FALSE if it is not.
  199.         2.  Returns E_FAIL on error.
  200.     --*/
  201.     HRESULT
  202.     IsProfileLocked (
  203.         ) ;
  204. } ;
  205.  
  206. /*++
  207.     ============================================================================
  208.     ============================================================================
  209.     IStreamBufferSink2 ()
  210.  
  211.     Stream Source interface;
  212.     implemented on the StreamBufferSink filter;
  213. --*/
  214. [
  215.     object,
  216.     uuid(DB94A660-F4FB-4bfa-BCC6-FE159A4EEA93),
  217.     pointer_default(unique)
  218. ]
  219. interface IStreamBufferSink2 : IStreamBufferSink
  220. {
  221.     /*++
  222.         ------------------------------------------------------------------------
  223.         UnlockProfile ()
  224.  
  225.         1.  Unlocks a profile explicitely.
  226.         2.  Is a noop if the sink is not locked & returns S_FALSE.
  227.         3.  Can only be called when the graph & filter are stopped.
  228.         4.  Since recordings are bound to the "lock session", incomplete
  229.             recordings i.e. those that have never been started, are
  230.             invalidated & must be re-created under the next "lock session".
  231.         5.  Profile still unlocks implicitly when the filter is stopped.
  232.     --*/
  233.     HRESULT
  234.     UnlockProfile (
  235.         ) ;
  236. } ;
  237.  
  238. /*++
  239.     ============================================================================
  240.     ============================================================================
  241.     IStreamBufferSink3 ()
  242.  
  243.     Stream Source interface;
  244.     implemented on the StreamBufferSink filter;
  245. --*/
  246. [
  247.     object,
  248.     uuid(974723f2-887a-4452-9366-2cff3057bc8f),
  249.     pointer_default(unique)
  250. ]
  251. interface IStreamBufferSink3 : IStreamBufferSink2
  252. {
  253.     /*++
  254.         -----------------------------------------------------------------------
  255.         SetAvailableFilter ()
  256.  
  257.         Bounds the minimum.  This affects readers so they cannot seek past
  258.           the specified minimum.
  259.  
  260.         Parameter Detail
  261.         ----------------
  262.  
  263.         prtMin
  264.  
  265.             min time relative to "now"
  266.  
  267.             cannot be NULL
  268.  
  269.             [in]: time, specified relative to the last sample written, to set
  270.             as the minimum time available to readers; valid values are <= 0;
  271.             use -MAXLONGLONG if all the backing store should be made available.
  272.  
  273.             [out]: actual min time; if the [in] value further back than what is
  274.             available, the [out] value will be set to the actual time made
  275.             available.
  276.  
  277.         Return Values
  278.         -------------
  279.  
  280.             success     S_OK
  281.  
  282.             failure     error code
  283.     --*/
  284.     HRESULT
  285.     SetAvailableFilter (
  286.         [in, out]   REFERENCE_TIME *    prtMin
  287.         ) ;
  288. } ;
  289.  
  290. /*++
  291.     ============================================================================
  292.     ============================================================================
  293.     IStreamBufferSource ()
  294.  
  295.     Stream Source reader interface;
  296.     Implemented on the StreamBufferSource filter;
  297. --*/
  298. [
  299.     object,
  300.     uuid(1c5bd776-6ced-4f44-8164-5eab0e98db12),
  301.     pointer_default(unique)
  302. ]
  303. interface IStreamBufferSource : IUnknown
  304. {
  305.     /*++
  306.         ------------------------------------------------------------------------
  307.         SetStreamSink ()
  308.  
  309.         1.  Sets the StreamBuffer Sink that streams from this Source;
  310.         2.  IStreamBufferSink object must be in the same process as this object;
  311.         3.  Interface is AddRef()'d if the call succeeds;
  312.  
  313.         Parameter Detail
  314.         ----------------
  315.  
  316.         pIStreamBufferSink
  317.  
  318.             Sink that will stream to this Source
  319.     --*/
  320.     HRESULT
  321.     SetStreamSink (
  322.         [in]    IStreamBufferSink *    pIStreamBufferSink
  323.         ) ;
  324. } ;
  325.  
  326. /*++
  327.     ============================================================================
  328.     ============================================================================
  329.     IStreamBufferRecordControl
  330.  
  331.     obtained by QIing IStreamBufferSink::CreateRecorder()-returned IUnknown *
  332. --*/
  333. [
  334.     object,
  335.     uuid(ba9b6c99-f3c7-4ff2-92db-cfdd4851bf31),
  336.     pointer_default(unique)
  337. ]
  338. interface IStreamBufferRecordControl : IUnknown
  339. {
  340.     /*++
  341.         ------------------------------------------------------------------------
  342.         Start ()
  343.  
  344.         1.  Starts a recording;
  345.         2.  Will save to the filename that is specified when this interface's
  346.             IUnknown is requested (IStreamBufferSink::CreateRecorder());
  347.  
  348.         Parameter Detail
  349.         ----------------
  350.  
  351.         rtStart
  352.  
  353.             Start time relative to "now;
  354.  
  355.             If the recording type is a content recording, can only refer to
  356.             seconds in the future; allowed seconds are [0,5]
  357.  
  358.             If the recording type is a reference recording, can refer to any
  359.             time that still has valid content i.e. content that has not yet
  360.             become stale
  361.  
  362.             If the recording is a reference recording and (* prtStart) is
  363.             earlier than the earliest still-valid content, the call will reset
  364.             it to the earliest content; the value when the recording was
  365.             actually started will be [out]
  366.     --*/
  367.     HRESULT
  368.     Start (
  369.         [in,out]    REFERENCE_TIME *    prtStart
  370.         ) ;
  371.  
  372.     /*++
  373.         ------------------------------------------------------------------------
  374.         Stop ()
  375.  
  376.         1.  Stops a recording;
  377.         2.  Closes out the file;
  378.  
  379.         Parameter Detail
  380.         ----------------
  381.  
  382.         rtStart
  383.  
  384.             Stop time relative to "now;
  385.  
  386.             If the recording type is a content recording, can only refer to
  387.             seconds in the future; allowed seconds are [0,5]
  388.  
  389.             If the recording type is a reference recording, can refer to any
  390.             time that still has valid content i.e. content that has not yet
  391.             become stale; stop time cannot be <= start time
  392.     --*/
  393.     HRESULT
  394.     Stop (
  395.         [in]    REFERENCE_TIME  rtStop
  396.         ) ;
  397.  
  398.     /*++
  399.         ------------------------------------------------------------------------
  400.         GetRecordingStatus ()
  401.  
  402.         1.  Retrieves the status of the recording
  403.  
  404.         Parameter Detail
  405.         ----------------
  406.  
  407.         phResult
  408.  
  409.             The (current) status of writing or closing the recording file;
  410.  
  411.             Can be NULL;
  412.  
  413.         pbStarted
  414.  
  415.             If supplied, set to a non-zero value if the recording has been
  416.             started
  417.  
  418.             Can be NULL;
  419.  
  420.         pbStopped
  421.  
  422.             If supplied, set to a non-zero value if the recording has been
  423.             stopped;
  424.  
  425.             Can be NULL;
  426.  
  427.         NOTE: If the recording has never been started, it will not be flagged
  428.                 as stopped.
  429.  
  430.     --*/
  431.     HRESULT
  432.     GetRecordingStatus (
  433.         [out] HRESULT * phResult,
  434.         [out] BOOL *    pbStarted,
  435.         [out] BOOL *    pbStopped
  436.         ) ;
  437. } ;
  438.  
  439. /*++
  440.     ============================================================================
  441.     ============================================================================
  442.     IStreamBufferRecComp
  443.  
  444.     CoCreateInstance CLSID_StreamBufferComposeRecording and QueryInterface for
  445.     this interface; this interface allows the creation of a single target
  446.     content recording which consists of a number of concatenated recordings
  447.     (reference or content; can mix & match if desired)
  448. --*/
  449.  
  450. [
  451.     object,
  452.     uuid(9E259A9B-8815-42ae-B09F-221970B154FD),
  453.     pointer_default(unique)
  454. ]
  455. interface IStreamBufferRecComp : IUnknown
  456. {
  457.     /*++
  458.         ------------------------------------------------------------------------
  459.         Initialize ()
  460.  
  461.         1. Initializes for a target recording
  462.  
  463.         Parameter Detail
  464.         ----------------
  465.  
  466.         pszTargetFilename
  467.  
  468.             Sets the target filename
  469.  
  470.             Fails if the file already exists
  471.  
  472.         pszSBRecProfileRef
  473.  
  474.             Must be a completed, SBE-generated recording
  475.  
  476.             This recording's profile will be used to define the target profile
  477.  
  478.             Appended files must have exactly the same profile
  479.     --*/
  480.     HRESULT
  481.     Initialize (
  482.         [in]    LPCWSTR pszTargetFilename,
  483.         [in]    LPCWSTR pszSBRecProfileRef
  484.         ) ;
  485.  
  486.     /*++
  487.         ------------------------------------------------------------------------
  488.         Append ()
  489.  
  490.         1.  appends an entire recording
  491.         2.  fails if the recording is live
  492.     --*/
  493.     HRESULT
  494.     Append (
  495.         [in]    LPCWSTR pszSBRecording
  496.         ) ;
  497.  
  498.     /*++
  499.         ------------------------------------------------------------------------
  500.         AppendEx ()
  501.  
  502.         1.  appends the specified portion of the recording; the parameters must
  503.             be accurate; the call will not readjust them within the boundaries
  504.         2.  the time spread must be at least 2 seconds
  505.         3.  fails if the recording is live
  506.     --*/
  507.     HRESULT
  508.     AppendEx (
  509.         [in]    LPCWSTR         pszSBRecording,
  510.         [in]    REFERENCE_TIME  rtStart,
  511.         [in]    REFERENCE_TIME  rtStop
  512.         ) ;
  513.  
  514.     /*++
  515.         ------------------------------------------------------------------------
  516.         GetCurrentLength ()
  517.  
  518.         1.  returns the current length of the recording; updates as recordings
  519.             are appended;
  520.         2.  can be called repeatedly during a Append() call on another
  521.             thread;
  522.     --*/
  523.     HRESULT
  524.     GetCurrentLength (
  525.         [out]   DWORD * pcSeconds
  526.         ) ;
  527.  
  528.     /*++
  529.         ------------------------------------------------------------------------
  530.         Close ()
  531.  
  532.         1.  explicitely closes the recording
  533.  
  534.         2.  final release of interface closes the recording as well
  535.     --*/
  536.     HRESULT
  537.     Close (
  538.         ) ;
  539.  
  540.     /*++
  541.         ------------------------------------------------------------------------
  542.         Cancel ()
  543.  
  544.         1.  cancels an in-progress appending operation; has no effect otherwise
  545.     --*/
  546.     HRESULT
  547.     Cancel (
  548.         ) ;
  549. } ;
  550.  
  551. /*++
  552.     ============================================================================
  553.     ============================================================================
  554.     IStreamBufferRecordingAttribute
  555.  
  556.     obtained by calling QueryInterface on a recorder
  557.  
  558.     well-known attributes:
  559.  
  560.         NAME                DESCRIPTION
  561.         ------------------- ----------------------------------------------------
  562.  
  563.         Title               String containing the content title.
  564.  
  565.         Author              String containing the name of the content author.
  566.  
  567.         Description         String containing a description of the content.
  568.  
  569.         Rating              String containing a content rating.
  570.  
  571.         Copyright           String containing a content copyright message.
  572.  
  573.         Duration            Quadruple word value containing the playing duration
  574.                                 of the file, in 100-nanosecond units.
  575.  
  576.         Bitrate             Double word value containing the bit rate.
  577.  
  578.         Seekable            Boolean value; true denoting that the content is
  579.                                 seekable.
  580.  
  581.         Stridable           Boolean value, true denoting that the content is
  582.                                 stridable (fast forward and rewind are enabled).
  583.  
  584.         Broadcast           Boolean value; true denoting that the content is not
  585.                                 copyright-protected, and can be broadcast.
  586.  
  587.         Use_DRM             reserved
  588.  
  589.         DRM_Flags           reserved
  590.  
  591.         DRM_Level           reserved
  592.  
  593.         Is_Protected        reserved
  594.  
  595.         Is_Trusted          reserved
  596.  
  597.         Signature_Name      reserved
  598.  
  599.         HasAudio            Boolean, true denoting the content includes an
  600.                                 audio stream.
  601.  
  602.         HasImage            Boolean, true denoting the content includes a still
  603.                                 image stream (such as JPEG images).
  604.  
  605.         HasScript           Boolean, true denoting the content includes a script
  606.                                 stream.
  607.  
  608.         HasVideo            Boolean, true denoting the content includes a video
  609.                                 stream.
  610.  
  611.         CurrentBitrate      Double word containing the current total bitrate,
  612.                                 usually used for MEB (multi-bit rate) streams.
  613.  
  614.         OptimalBitrate      Double word containing the minimum total bitrate
  615.                                 recommended to stream the content and get
  616.                                 maximum quality.
  617.  
  618.         WM/AlbumTitle       String containing the album title.
  619.  
  620.         WM/Track            Double word containing the track number.
  621.  
  622.         WM/PromotionURL     String with a URL to an HTML page that contains
  623.                                 information about products and events (such as
  624.                                 concerts) that are related to this music.
  625.  
  626.         WM/AlbumCoverURL    String with a URL to an HTML page that contains an
  627.                                 image of the album cover and information about
  628.                                 the album.
  629.  
  630.         WM/Genre            String with the genre of the music.
  631.  
  632.         WM/Year             String with the year of publication of the music.
  633.  
  634.         WM/GenreID
  635.  
  636.         WM/MCDI
  637.  
  638.         BannerImageType     One member of the WMT_ATTR_IMAGETYPE enumeration
  639.                                 type.
  640.  
  641.         BannerImageData     The actual image data: a bitmap, JPEG, or GIF image.
  642.  
  643.  
  644.         BannerImageURL      If the banner image is clicked on then this URL is
  645.                                 activated.
  646.  
  647.         CopyrightURL        An URL to a copyright page.
  648.  
  649.         NSC_Name            String containing the multicast station contact
  650.                                 name (read-only).
  651.  
  652.         NSC_Address         String containing the multicast station contact
  653.                                 address (read-only).
  654.  
  655.         NSC_Phone           String containing the multicast station contact
  656.                                 phone number (read-only).
  657.  
  658.         NSC_Email           String containing the multicast station contact
  659.                                 email address (read-only).
  660.  
  661.         NSC_Description     String containing the multicast station contact
  662.                                 description (read-only).
  663.  
  664. --*/
  665.  
  666. cpp_quote( "////////////////////////////////////////////////////////////////" )
  667. cpp_quote( "//" )
  668. cpp_quote( "// List of pre-defined attributes " )
  669. cpp_quote( "//" )
  670. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingDuration[] =L\"Duration\";" )
  671. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBitrate[] =L\"Bitrate\";" )
  672. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingSeekable[] =L\"Seekable\";" )
  673. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingStridable[] =L\"Stridable\";" )
  674. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBroadcast[] =L\"Broadcast\";" )
  675. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingProtected[] =L\"Is_Protected\";" )
  676. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingTrusted[] =L\"Is_Trusted\";" )
  677. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingSignature_Name[] =L\"Signature_Name\";" )
  678. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasAudio[] =L\"HasAudio\";" )
  679. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasImage[] =L\"HasImage\";" )
  680. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasScript[] =L\"HasScript\";" )
  681. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasVideo[] =L\"HasVideo\";" )
  682. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingCurrentBitrate[] =L\"CurrentBitrate\";" )
  683. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingOptimalBitrate[] =L\"OptimalBitrate\";" )
  684. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasAttachedImages[] =L\"HasAttachedImages\";" )
  685. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingSkipBackward[] =L\"Can_Skip_Backward\";" )
  686. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingSkipForward[] =L\"Can_Skip_Forward\";" )
  687. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNumberOfFrames[] =L\"NumberOfFrames\";" )
  688. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingFileSize[] =L\"FileSize\";" )
  689. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasArbitraryDataStream[] =L\"HasArbitraryDataStream\";" )
  690. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingHasFileTransferStream[] =L\"HasFileTransferStream\";" )
  691. cpp_quote( "" )
  692. cpp_quote( "////////////////////////////////////////////////////////////////" )
  693. cpp_quote( "//" )
  694. cpp_quote( "// The content description object supports 5 basic attributes." )
  695. cpp_quote( "//" )
  696. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingTitle[] =L\"Title\";" )
  697. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAuthor[] =L\"Author\";" )
  698. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingDescription[] =L\"Description\";" )
  699. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingRating[] =L\"Rating\";" )
  700. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingCopyright[] =L\"Copyright\";" )
  701. cpp_quote( "" )
  702. cpp_quote( "////////////////////////////////////////////////////////////////" )
  703. cpp_quote( "//" )
  704. cpp_quote( "// These attributes are used to configure DRM using IWMDRMWriter::SetDRMAttribute." )
  705. cpp_quote( "//" )
  706. cpp_quote( "static const WCHAR *g_wszStreamBufferRecordingUse_DRM = L\"Use_DRM\";" )
  707. cpp_quote( "static const WCHAR *g_wszStreamBufferRecordingDRM_Flags = L\"DRM_Flags\";" )
  708. cpp_quote( "static const WCHAR *g_wszStreamBufferRecordingDRM_Level = L\"DRM_Level\";" )
  709. cpp_quote( "" )
  710. cpp_quote( "////////////////////////////////////////////////////////////////" )
  711. cpp_quote( "//" )
  712. cpp_quote( "// These are the additional attributes defined in the WM attribute" )
  713. cpp_quote( "// namespace that give information about the content." )
  714. cpp_quote( "//" )
  715. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAlbumTitle[] =L\"WM/AlbumTitle\";" )
  716. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingTrack[] =L\"WM/Track\";" )
  717. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingPromotionURL[] =L\"WM/PromotionURL\";" )
  718. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAlbumCoverURL[] =L\"WM/AlbumCoverURL\";" )
  719. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingGenre[] =L\"WM/Genre\";" )
  720. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingYear[] =L\"WM/Year\";" )
  721. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingGenreID[] =L\"WM/GenreID\";" )
  722. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingMCDI[] =L\"WM/MCDI\";" )
  723. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingComposer[] =L\"WM/Composer\";" )
  724. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingLyrics[] =L\"WM/Lyrics\";" )
  725. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingTrackNumber[] =L\"WM/TrackNumber\";" )
  726. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingToolName[] =L\"WM/ToolName\";" )
  727. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingToolVersion[] =L\"WM/ToolVersion\";" )
  728. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingIsVBR[] =L\"IsVBR\";" )
  729.  
  730. //
  731. // WM/AlbumArtist is a potentially different value than Author
  732. //
  733. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAlbumArtist[] =L\"WM/AlbumArtist\";" )
  734. cpp_quote( "" )
  735.  
  736. cpp_quote( "////////////////////////////////////////////////////////////////" )
  737. cpp_quote( "//" )
  738. cpp_quote( "// These optional attributes may be used to give information " )
  739. cpp_quote( "// about the branding of the content." )
  740. cpp_quote( "//" )
  741. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBannerImageType[] =L\"BannerImageType\";" )
  742. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBannerImageData[] =L\"BannerImageData\";" )
  743. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingBannerImageURL[] =L\"BannerImageURL\";" )
  744. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingCopyrightURL[] =L\"CopyrightURL\";" )
  745.  
  746. cpp_quote( "////////////////////////////////////////////////////////////////" )
  747. cpp_quote( "//" )
  748. cpp_quote( "// Optional attributes, used to give information " )
  749. cpp_quote( "// about video stream properties." )
  750. cpp_quote( "//" )
  751. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAspectRatioX[] =L\"AspectRatioX\";" )
  752. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAspectRatioY[] =L\"AspectRatioY\";" )
  753.  
  754. cpp_quote( "////////////////////////////////////////////////////////////////" )
  755. cpp_quote( "//" )
  756. cpp_quote( "// The NSC file supports the following attributes." )
  757. cpp_quote( "//" )
  758. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCName[] =L\"NSC_Name\";" )
  759. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCAddress[] =L\"NSC_Address\";" )
  760. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCPhone[] =L\"NSC_Phone\";" )
  761. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCEmail[] =L\"NSC_Email\";" )
  762. cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCDescription[] =L\"NSC_Description\";" )
  763. cpp_quote( "" )
  764.  
  765. //
  766. // StreamBuffer Attribute datatypes;
  767. //
  768. typedef enum {
  769.     STREAMBUFFER_TYPE_DWORD  = 0,
  770.     STREAMBUFFER_TYPE_STRING = 1,
  771.     STREAMBUFFER_TYPE_BINARY = 2,
  772.     STREAMBUFFER_TYPE_BOOL   = 3,
  773.     STREAMBUFFER_TYPE_QWORD  = 4,
  774.     STREAMBUFFER_TYPE_WORD   = 5,
  775.     STREAMBUFFER_TYPE_GUID   = 6,
  776. } STREAMBUFFER_ATTR_DATATYPE ;
  777.  
  778. [
  779.     object,
  780.     uuid(16CA4E03-FE69-4705-BD41-5B7DFC0C95F3),
  781.     pointer_default(unique)
  782. ]
  783. interface IStreamBufferRecordingAttribute : IUnknown
  784. {
  785.     /*++
  786.         ------------------------------------------------------------------------
  787.         SetAttribute ()
  788.  
  789.         1.  Sets an attribute on a recording object;
  790.         2.  Fails if the IStreamBufferRecordControl::Start has already been successfully
  791.             called;
  792.         3.  If an attribute of the same name already exists, overwrites the old;
  793.     --*/
  794.     HRESULT
  795.     SetAttribute (
  796.         [in]    ULONG                       ulReserved,
  797.         [in]    LPCWSTR                     pszAttributeName,
  798.         [in]    STREAMBUFFER_ATTR_DATATYPE  StreamBufferAttributeType,
  799.         [in, size_is (cbAttributeLength)]   BYTE *     pbAttribute,
  800.         [in]    WORD                        cbAttributeLength
  801.         ) ;
  802.  
  803.     /*++
  804.         ------------------------------------------------------------------------
  805.         GetAttributeCount ()
  806.  
  807.         1.  Returns the count of attributes currently set;
  808.     --*/
  809.     HRESULT
  810.     GetAttributeCount (
  811.         [in]    ULONG   ulReserved,
  812.         [out]   WORD *  pcAttributes
  813.         ) ;
  814.  
  815.     /*++
  816.         ------------------------------------------------------------------------
  817.         GetAttributeByName ()
  818.  
  819.         1.  Given a name, returns the attribute data;
  820.         2.  If the provided buffer is too small, returns VFW_E_BUFFER_OVERFLOW,
  821.             and (* pcbLength) contains the minimum required length of the buffer
  822.         3.  To learn the length of the attribute, pass in non-NULL pcbLength,
  823.             and NULL pbAttribute parameter; [out] value will be the length of
  824.             the attribute
  825.     --*/
  826.     HRESULT
  827.     GetAttributeByName (
  828.         [in]        LPCWSTR                         pszAttributeName,
  829.         [in]        ULONG *                         pulReserved,
  830.         [out]       STREAMBUFFER_ATTR_DATATYPE *    pStreamBufferAttributeType,
  831.         [out, size_is (* pcbLength)]    BYTE *      pbAttribute,
  832.         [in, out]   WORD *                          pcbLength
  833.         ) ;
  834.  
  835.     /*++
  836.         ------------------------------------------------------------------------
  837.         GetAttributeByIndex ()
  838.  
  839.         1.  Given an 0-based index, returns the attribute name and data
  840.         2.  If either buffer is too small, returns VFW_E_BUFFER_OVERFLOW, and
  841.             (* pcbLength) and (* pcchNameLength) contain the minimum required
  842.             length of each buffer
  843.         3.  The length returned by pcchNameLength includes the null-terminator
  844.         4.  To learn the length of the name & attribute, pass in non-NULL
  845.             pcchNameLength & pcbLength, and NULL pszAttributeName & pbAttribute
  846.             parameters; [out] value of the non-NULL parameters will be the
  847.             lengths of the name and attribute
  848.     --*/
  849.     HRESULT
  850.     GetAttributeByIndex (
  851.         [in]        WORD                            wIndex,
  852.         [in]        ULONG *                         pulReserved,
  853.         [out]       WCHAR *                         pszAttributeName,
  854.         [in, out]   WORD *                          pcchNameLength,         //  includes NULL-terminator; in BYTES
  855.         [out]       STREAMBUFFER_ATTR_DATATYPE *    pStreamBufferAttributeType,
  856.         [out, size_is (* pcbLength)]    BYTE *      pbAttribute,
  857.         [in, out]   WORD *                          pcbLength
  858.         ) ;
  859.  
  860.     /*++
  861.         ------------------------------------------------------------------------
  862.         EnumAttributes ()
  863.  
  864.         1.  Returns a StreamBuffer attribute enumeration object that snapshots
  865.             the attributes at time-of-call
  866.     --*/
  867.     HRESULT
  868.     EnumAttributes (
  869.         [out]   IEnumStreamBufferRecordingAttrib **     ppIEnumStreamBufferAttrib
  870.         ) ;
  871. } ;
  872.  
  873. /*++
  874.     ============================================================================
  875.     ============================================================================
  876.     IEnumStreamBufferRecordingAttrib
  877.  
  878.     obtained by calling IStreamBufferRecordingAttribute::EnumAttributes, or
  879.     calling clone on this interface
  880. --*/
  881.  
  882. typedef struct {
  883.     LPWSTR                      pszName ;                   //  allocated by callee; freed by caller
  884.     STREAMBUFFER_ATTR_DATATYPE  StreamBufferAttributeType ;
  885.     BYTE *                      pbAttribute ;               //  allocated by callee; freed by caller
  886.     WORD                        cbLength ;
  887. } STREAMBUFFER_ATTRIBUTE ;
  888.  
  889. [
  890.     object,
  891.     uuid (C18A9162-1E82-4142-8C73-5690FA62FE33),
  892.     pointer_default(unique)
  893. ]
  894. interface IEnumStreamBufferRecordingAttrib : IUnknown
  895. {
  896.     HRESULT
  897.     Next (
  898.         [in]                            ULONG                       cRequest,
  899.         [in, out, size_is (cRequest)]   STREAMBUFFER_ATTRIBUTE *    pStreamBufferAttribute,
  900.         [out]                           ULONG *                     pcReceived
  901.         ) ;
  902.  
  903.     HRESULT
  904.     Skip (
  905.         [in]    ULONG   cRecords
  906.         ) ;
  907.  
  908.     HRESULT
  909.     Reset (
  910.         ) ;
  911.  
  912.     HRESULT
  913.     Clone (
  914.         [out]   IEnumStreamBufferRecordingAttrib **  ppIEnumStreamBufferAttrib
  915.         ) ;
  916. } ;
  917.  
  918. /*++
  919.     ============================================================================
  920.     ============================================================================
  921.     IStreamBufferConfigure
  922.  
  923. --*/
  924. [
  925.     object,
  926.     uuid(ce14dfae-4098-4af7-bbf7-d6511f835414),
  927.     pointer_default(unique)
  928. ]
  929. interface IStreamBufferConfigure : IUnknown
  930. {
  931.     /*++
  932.         ------------------------------------------------------------------------
  933.         SetStreamBufferDirectory ()
  934.  
  935.         1.  Sets the directory where all content is saved, ringbuffer &
  936.             StreamBuffer;
  937.         2.  Creates directory if necessary;
  938.         3.  All TEMP files have hidden+system attributes
  939.     --*/
  940.     HRESULT
  941.     SetDirectory (
  942.         [in]    LPCWSTR pszDirectoryName
  943.         ) ;
  944.  
  945.     /*++
  946.         ------------------------------------------------------------------------
  947.         GetStreamBufferDirectory ()
  948.  
  949.         1.  Retrieves previously set backing store directory, or default
  950.             location if none was specified
  951.     --*/
  952.     HRESULT
  953.     GetDirectory (
  954.         [out]   LPWSTR *    ppszDirectoryName
  955.         ) ;
  956.  
  957.     /*++
  958.         ------------------------------------------------------------------------
  959.         SetBackingFileCount ()
  960.  
  961.         1.  Sets the number of backing files
  962.         2.  valid values
  963.  
  964.                 4 <= min <= 100
  965.                 6 <= max <= 102
  966.                 min max delta >= 2
  967.     --*/
  968.     HRESULT
  969.     SetBackingFileCount (
  970.         [in]    DWORD   dwMin,
  971.         [in]    DWORD   dwMax
  972.         ) ;
  973.  
  974.     /*++
  975.         ------------------------------------------------------------------------
  976.         GetBackingFileCount ()
  977.  
  978.         1.  Retrieves previously set backing file counts, or defaults if none
  979.             have have been set
  980.     --*/
  981.     HRESULT
  982.     GetBackingFileCount (
  983.         [out]   DWORD * pdwMin,
  984.         [out]   DWORD * pdwMax
  985.         ) ;
  986.  
  987.     /*++
  988.         ------------------------------------------------------------------------
  989.         SetEachBackingFileDuration ()
  990.  
  991.         1.  Sets the seconds of content each backing file will hold
  992.         2.  valid values:
  993.  
  994.                 dwSeconds >= 15
  995.     --*/
  996.     HRESULT
  997.     SetBackingFileDuration (
  998.         [in]    DWORD   dwSeconds
  999.         ) ;
  1000.  
  1001.     /*++
  1002.         ------------------------------------------------------------------------
  1003.         GetEachBackingFileDuration ()
  1004.  
  1005.         1.  Retrieves previously set backing file duration, or default of none
  1006.             is set
  1007.     --*/
  1008.     HRESULT
  1009.     GetBackingFileDuration (
  1010.         [out]   DWORD * pdwSeconds
  1011.         ) ;
  1012. } ;
  1013.  
  1014. /*++
  1015.     ============================================================================
  1016.     ============================================================================
  1017.     IStreamBufferConfigure2
  1018.  
  1019. --*/
  1020. [
  1021.     object,
  1022.     uuid(53E037BF-3992-4282-AE34-2487B4DAE06B),
  1023.     pointer_default(unique)
  1024. ]
  1025. interface IStreamBufferConfigure2 : IStreamBufferConfigure
  1026. {
  1027.     /*++
  1028.         ------------------------------------------------------------------------
  1029.         SetMultiplexedPacketSize ()
  1030.  
  1031.         1.  sets the size of the target multiplexed packet size
  1032.         2.  valid values:
  1033.  
  1034.                 8192 <= cbBytesPerPacket <= 65535
  1035.  
  1036.         This is useful if low-bitrate streams are used, and the time to fill a
  1037.         multiplexed packet is excessive when the default value of 65535 bytes
  1038.         is used.
  1039.     --*/
  1040.     HRESULT
  1041.     SetMultiplexedPacketSize (
  1042.         [in]    DWORD   cbBytesPerPacket
  1043.         ) ;
  1044.  
  1045.     /*++
  1046.         ------------------------------------------------------------------------
  1047.         GetMultiplexedPacketSize ()
  1048.  
  1049.         1.  gets the size of the target multiplexed packet size
  1050.     --*/
  1051.     HRESULT
  1052.     GetMultiplexedPacketSize (
  1053.         [out]   DWORD * pcbBytesPerPacket
  1054.         ) ;
  1055.  
  1056.     /*++
  1057.         ------------------------------------------------------------------------
  1058.         SetFFTransitionRates ()
  1059.  
  1060.         1.  sets the fast forward (FF) rates for which the Stream Buffer Engine
  1061.               transitions from FullFrame to KeyFrame to KeyFrame + Seeks.
  1062.         2.  valid values:
  1063.  
  1064.                 1 < dwMaxFullFrameRate < dwMaxNonSkippingRate
  1065.  
  1066.         FF playback transitions from full-frame play, then to all keyframes,
  1067.         then to keyframes + seekaheads.  This method allows the transition
  1068.         rates to be set.  By default they are 4 and 6.  If the rate is in (0,4]
  1069.         all the frames are sent to the codec.  If the rate is in (4,6] just
  1070.         keyframes are sent.  If the rate is > 6, then only keyframes are sent,
  1071.         and a seekahead between keyframes is used that is proportionally
  1072.         aggressive to the specified rate.
  1073.     --*/
  1074.     HRESULT
  1075.     SetFFTransitionRates (
  1076.         [in]    DWORD   dwMaxFullFrameRate,
  1077.         [in]    DWORD   dwMaxNonSkippingRate
  1078.         ) ;
  1079.  
  1080.     /*++
  1081.         ------------------------------------------------------------------------
  1082.         GetFFTransitionRates ()
  1083.  
  1084.         1.  gets the fast forward (FF) rates for which the Stream Buffer Engine
  1085.               transitions from FullFrame to KeyFrame to KeyFrameWithSeeks.
  1086.     --*/
  1087.     HRESULT
  1088.     GetFFTransitionRates (
  1089.         [out]   DWORD * pdwMaxFullFrameRate,
  1090.         [out]   DWORD * pdwMaxNonSkippingRate
  1091.         ) ;
  1092. } ;
  1093.  
  1094. /*++
  1095.     ============================================================================
  1096.     ============================================================================
  1097.     IStreamBufferMediaSeeking
  1098.  
  1099.     Implemented on the StreamBufferSource filter.  Used to seek and set the
  1100.     playback rate.
  1101.  
  1102. --*/
  1103.  
  1104. [
  1105.     object,
  1106.     uuid(f61f5c26-863d-4afa-b0ba-2f81dc978596),
  1107.     pointer_default(unique)
  1108. ]
  1109. interface IStreamBufferMediaSeeking : IMediaSeeking
  1110. {
  1111.     //  no additional methods have been added
  1112. } ;
  1113.  
  1114. /*++
  1115.     ============================================================================
  1116.     ============================================================================
  1117.     IStreamBufferMediaSeeking2
  1118.  
  1119.     Implemented on the StreamBufferSource filter.  Used to seek and set the
  1120.     playback rate.
  1121.  
  1122. --*/
  1123.  
  1124. [
  1125.     object,
  1126.     uuid(3a439ab0-155f-470a-86a6-9ea54afd6eaf),
  1127.     pointer_default(unique)
  1128. ]
  1129. interface IStreamBufferMediaSeeking2 : IStreamBufferMediaSeeking
  1130. {
  1131.     /*++
  1132.         -----------------------------------------------------------------------
  1133.         SetRateEx ()
  1134.  
  1135.         Allows the application to override SBE's trick mode seekahead
  1136.         computation.
  1137.  
  1138.         The specified frame rate will, on average, be correct, but may
  1139.         have some variance if averaged over short periods of time.  This is
  1140.         due to the content's compression schema.
  1141.  
  1142.         The frame rate is applied to the video stream, if one exists.  If no
  1143.         video stream exists, the rate call fails.  The framerate parameter
  1144.         (dwFramesPerSec) is ignored when the specified abs(rate) is less than or
  1145.         equal to the maximum non-skipping rate (see IStreamBufferConfigure2::
  1146.         SetFFTransitionRates ()).
  1147.  
  1148.         Parameter Detail
  1149.         ----------------
  1150.  
  1151.             dRate           rate at which the content is to be played.
  1152.                             valid values are all rates, excluding the following
  1153.                               range: (-0.1, 0.1)
  1154.  
  1155.             dwFramesPerSec  frames per second
  1156.                             cannot be 0
  1157.                             SBE does not enforce this parameter with respect to
  1158.                               the screen refresh rate
  1159.                             ignored if the abs(dRate) value is <= max non-
  1160.                               skipping rate (see IStreamBufferConfigure2::
  1161.                               SetFFTransitionRates ()).
  1162.  
  1163.         Return Values
  1164.         -------------
  1165.  
  1166.             success     S_OK
  1167.  
  1168.             failure     error code
  1169.     --*/
  1170.     HRESULT
  1171.     SetRateEx (
  1172.         [in]    double  dRate,
  1173.         [in]    DWORD   dwFramesPerSec
  1174.         ) ;
  1175. } ;
  1176.  
  1177.  
  1178. /*++
  1179.     ============================================================================
  1180.     ============================================================================
  1181.     IStreamBufferDataCounters
  1182.  
  1183.     Implemented on the StreamBufferSource & StreamBufferSink filter pins.  Used
  1184.       to get instantaneous traffic counters for the pin.
  1185.  
  1186. --*/
  1187.  
  1188. typedef struct {
  1189.     ULONGLONG   cDataBytes ;            //  total sample payload bytes
  1190.     ULONGLONG   cSamplesProcessed ;     //  samples processed
  1191.     ULONGLONG   cDiscontinuities ;      //  number of discontinuities
  1192.     ULONGLONG   cSyncPoints ;           //  number of syncpoints
  1193.     ULONGLONG   cTimestamps ;           //  number of timestamps
  1194. } SBE_PIN_DATA ;
  1195.  
  1196. [
  1197.     object,
  1198.     uuid(9D2A2563-31AB-402e-9A6B-ADB903489440),
  1199.     pointer_default(unique)
  1200. ]
  1201. interface IStreamBufferDataCounters : IUnknown
  1202. {
  1203.     //  retrieves the instantaneous values in the data structure
  1204.     HRESULT
  1205.     GetData (
  1206.         [out]   SBE_PIN_DATA *  pPinData
  1207.         ) ;
  1208.  
  1209.     //  sets all the data structure values to 0
  1210.     HRESULT
  1211.     ResetData (
  1212.         ) ;
  1213. } ;
  1214.  
  1215. /*++
  1216.     ============================================================================
  1217.     ============================================================================
  1218.     events
  1219. --*/
  1220.  
  1221. //  see evcode.h comment for range
  1222. //  stream buffer engine (PVR)   0x0326 - 0x0350 (sbe.idl)
  1223.  
  1224. cpp_quote ("#define STREAMBUFFER_EC_BASE                     0x0326")
  1225.  
  1226. cpp_quote ("enum {")
  1227. cpp_quote ("    //  timehole event")
  1228. cpp_quote ("    //      param1 = timehole stream offset ms")
  1229. cpp_quote ("    //      param1 = timehole size ms")
  1230. cpp_quote ("    STREAMBUFFER_EC_TIMEHOLE = STREAMBUFFER_EC_BASE,")
  1231. cpp_quote ("    ")
  1232. cpp_quote ("    STREAMBUFFER_EC_STALE_DATA_READ,")
  1233. cpp_quote ("    ")
  1234. cpp_quote ("    STREAMBUFFER_EC_STALE_FILE_DELETED,")
  1235. cpp_quote ("    STREAMBUFFER_EC_CONTENT_BECOMING_STALE,")
  1236. cpp_quote ("    STREAMBUFFER_EC_WRITE_FAILURE,")
  1237. cpp_quote ("    //")
  1238. cpp_quote ("    //  unexpected read failure")
  1239. cpp_quote ("    //      param1 = HRESULT failure")
  1240. cpp_quote ("    //      param2 = undefined")
  1241. cpp_quote ("    STREAMBUFFER_EC_READ_FAILURE,")
  1242. cpp_quote ("    //")
  1243. cpp_quote ("    //  playback rate change")
  1244. cpp_quote ("    //      param1 = old_playback_rate * 10000 e.g. 2x is 20000")
  1245. cpp_quote ("    //      param2 = new_playback_rate * 10000")
  1246. cpp_quote ("    STREAMBUFFER_EC_RATE_CHANGED,")
  1247. cpp_quote ("} ;")
  1248.  
  1249. /*++
  1250.     ============================================================================
  1251.     ============================================================================
  1252.     trick mode
  1253.  
  1254.     We've extended the 1.0 interfaces as follows:
  1255.  
  1256.     1. source filter presents timestamps that monotonically increase overtime
  1257.  
  1258.     2. flushes should have no effect over queued rate segments
  1259.  
  1260.     3. discontinuities have no effect over queued rate segments
  1261.  
  1262.     To use the interface, continue to use AM_KSPROPSETID_TSRateChange, but use
  1263.     dwPropId that is higher
  1264.  
  1265. --*/
  1266.  
  1267. #ifdef USE_AM_PROPERTY_TS_RATE_CHANGE_11
  1268. cpp_quote ("typedef enum {")
  1269. cpp_quote ("    AM_RATE_UseRateVersion = AM_RATE_Step + 1,")
  1270. cpp_quote ("    AM_RATE_QueryFullFrameRate,")
  1271. cpp_quote ("    AM_RATE_QueryLastRateSegPTS")
  1272. cpp_quote ("} AM_PROPERTY_TS_RATE_CHANGE_11 ;")
  1273.  
  1274. //  AM_RATE_QueryRate; this is the max full-frame rate; source filter can use
  1275. //    up to this; it can use less
  1276. cpp_quote ("typedef struct {")
  1277. cpp_quote ("    LONG    lMaxForwardFullFrame ;          //  rate * 10000")
  1278. cpp_quote ("    LONG    lMaxReverseFullFrame ;          //  rate * 10000")
  1279. cpp_quote ("} AM_QueryRate ;")
  1280. #endif // USE_AM_PROPERTY_TS_RATE_CHANGE_11
  1281.  
  1282. /*
  1283. ================================================================================
  1284. AM_RATE_UseRateVersion
  1285. --------------------------------------------------------------------------------
  1286. Specifies the rate change version to be used.
  1287.  
  1288. The default behavior should be per 1.0.
  1289.  
  1290. Use a WORD value.  The high-order byte specifies the minor version (revision)
  1291. number; the low-order byte specifies the major version number.  On a
  1292. little-endian system (e.g. x86), the WORD value version for the contents of
  1293. this specification is 0x0101.
  1294.  
  1295. If the specified rate version is not supported, the call should fail with
  1296. an E_NOINTERFACE error code.
  1297.  
  1298. ================================================================================
  1299. AM_RATE_QueryFullFrameRate
  1300. --------------------------------------------------------------------------------
  1301. Allows a source filter to query for maximum full-frame rates the timestamp
  1302. scaling filter is capable of.  Maximum full-frame forward and reverse rates
  1303. are queried for.
  1304.  
  1305. Use AM_QueryRate structure.  Timestamp scaling filter must set
  1306. lMaxReverseFullFrame struct member to negative rate.
  1307.  
  1308. The sourcing filter can still choose to set the full-frame rate to a value
  1309. smaller than the value returned by the timestamp scaling filter.  For example,
  1310. there may be IO issues that prevent a full-frame playback, even if the timestamp
  1311. scaling filter is capable.
  1312.  
  1313. Non-full frame playback will consist of groups of continuous samples sent to
  1314. the timestamp scaling filter, separated by discontinuities.  The timestamps for
  1315. each group of samples will jump across the discontinuities, but still increase
  1316. per the RunTimePlus timeline, when compared to RenderTime, once a steady state
  1317. runstate has been achieved.
  1318.  
  1319. Note that Rate is used this call, vs. speed.
  1320.  
  1321. ================================================================================
  1322. AM_RATE_QueryLastRateSegPTS
  1323. --------------------------------------------------------------------------------
  1324. Allows a source filter to query the timestamp scaling filter for the last-set
  1325. rate-segment's effective PTS, regardless of rate-segment position.
  1326.  
  1327. Note that Rate is used this call, vs. speed.
  1328.  
  1329. ================================================================================
  1330. AM_RATE_SimpleRateChange (with 1.1 semantics)
  1331. --------------------------------------------------------------------------------
  1332. If the rate is to be set to the most forward sample, the
  1333. AM_SimpleRateChange.StartTime member is set to value -1 by the sourcing filter.
  1334. This has meaning to the timestamp scaling filter to set the rate to the most
  1335. forward sample, and return that sample's presentation time via the method call's
  1336. [out] parameter.
  1337.  
  1338. If the specified rate segment is incompatible, all queued samples with PTS in
  1339. rate-incompatible segment can be discarded.
  1340.  
  1341. If the current rate is incompatible i.e. samples are being dropped by the
  1342. timestamp scaling filter and it is not keeping an internal queued, it should
  1343. fail the querying call (AM_SimpleRateChagne.StartTime = -1) with return error
  1344. VFW_E_DVD_WRONG_SPEED.  The sourcing filter will then set a rate with an
  1345. effective PTS.
  1346.  
  1347. */
  1348.  
  1349.